﻿using Admin.Core;
using Admin.Util;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Admin.Application.BaseManage
{
    /// <summary>
    /// 用户服务接口
    /// </summary>
    public interface IUserAppService
    {
        /// <summary>
        /// 获取当前用户信息
        /// </summary>
        /// <returns></returns>
        BaseUser Profile();

        /// <summary>
        /// 获取用户信息
        /// </summary>
        /// <returns></returns>
        Task<BaseUser> ProfileAsync([Required, Range(1, int.MaxValue, ErrorMessage = "请输入有效的用户 Id")] int userId);

        /// <summary>
        /// 获取所有用户列表
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<PagedList<BaseUser>> GetListAsync([FromQuery, Required] PageInput input);

        /// <summary>
        /// 查看当前用户拥有的权限
        /// </summary>
        /// <returns></returns>
        Task<List<SecurityProfile>> GetSecuritiesAsync();

        /// <summary>
        /// 查看当前用户拥有的菜单列表
        /// </summary>
        /// <returns></returns>
        Task<List<UserMenu>> GetMenuListAsync();
    }
}
